﻿using DevExpress.XtraBars.Docking2010.Views;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using XCI.Windows;

namespace DevExpress.ApplicationUI.Demos {
    [WidgetCaption("日历Widget")]
    public partial class Calendar : UserControl, IWidget
    {
        public Calendar() {
            InitializeComponent();
            dateNavigator1.DateTime = DateTime.Now;
            dateNavigator1.CalendarIndent = 10;
        }
        protected override void OnResize(System.EventArgs e) {
            base.OnResize(e);
            dateNavigator1.CalcBestSize();
        }

        public BaseDocument CreateDocument()
        {
            var doc = new XtraBars.Docking2010.Views.Widget.Document
            {
            };
            return doc;
        }

        public Control CreateInstance(Dictionary<string, string> paramMap)
        {
            return new Calendar();
        }
    }
}
